/**
 * @(#)RefererDaoImpl.java 2017年4月6日
 * Copyright(C) 2017 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IRefererDAO;
import org.jsbd.boss.domian.channel.Referer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
 

/**
 * TODO 请加入本类的说明
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
@Service
public class RefererDaoImpl extends CrackBaseDao implements IRefererDAO {
	public static final Logger LOGGER = LoggerFactory.getLogger(RefererDaoImpl.class);

	/* (non-Javadoc)
	 * @see org.jsbd.boss.dao.IAdDAO#selectAdList(java.lang.Integer, java.lang.Integer)
	 */
	@Override
	public List<Referer> selectRefererList(Integer length) {
		return super.queryForList("qy_referer.SELECT_REFERER_LIST", length);
	}
	
	@Override
	public Integer insertReferer(Referer referer){
		return (Integer) super.insert("qy_referer.INSERT_REFERER", referer);
	}
	
	@Override
	public Integer updateReferer(Referer referer){
		return (Integer) super.update("qy_referer.UPDATE_REFERER", referer);
	}

	/* (non-Javadoc)
	 * @see org.jsbd.boss.dao.IAdDAO#selectAd(org.jsbd.boss.domian.channel.Ad)
	 */
	@Override
	public Referer selectReferer(Referer referer) {
		return (Referer) super.queryForObject("qy_referer.SELECT_REFERER", referer);
	}

	/* (non-Javadoc)
	 * @see org.jsbd.boss.dao.IRefererDAO#selectPageRefererList(org.jsbd.boss.domian.channel.Referer)
	 */
	@Override
	public List<Referer> selectPageRefererList(Referer referer) {
		return super.queryForList("qy_referer.SELECT_PAGE_LIST", referer);
	}

	/* (non-Javadoc)
	 * @see org.jsbd.boss.dao.IRefererDAO#selectCountOfReferer(org.jsbd.boss.domian.channel.Referer)
	 */
	@Override
	public Integer selectCountOfReferer(Referer referer) {
		return super.queryForCount("qy_referer.SELECT_COUNT_REFERER", referer);
	}
	
}
